//
//  BRFAQListCell.m
//  Kexu
//
//  Created by IOS on 2023/7/24.
//

#import "BRFAQListCell.h"

@implementation BRFAQListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self setUI];
    }
    return self;
}

#pragma mark - UI --
- (void)setUI {
    self.backgroundColor = UIColor.clearColor;
    self.contentView.backgroundColor = UIColor.clearColor;
//    self.contentView.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.07].CGColor;
//    self.contentView.layer.shadowOffset = CGSizeMake(0,6);
//    self.contentView.layer.shadowRadius = 16;
//    self.contentView.layer.shadowOpacity = 1;
    // Radius Code
//    self.contentView.layer.cornerRadius = 10;
    
    UIView *contView = [[UIView alloc] init];
    contView.backgroundColor = UIColor.whiteColor;
    contView.layer.cornerRadius = 10;
    contView.layer.masksToBounds = YES;
    [self.contentView addSubview:contView];
    [contView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(0);
        make.left.offset(14);
        make.right.offset(-14);
        make.bottom.offset(-10);
    }];
    
    [contView addSubview:self.titleL];
    [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(14);
        make.top.offset(16);
        make.bottom.offset(-16);
        make.right.offset(-50);
    }];
    
    UIImageView *img = [[UIImageView alloc] initWithImage:UIImageMake(@"arrow_right_gray44")];
    [contView addSubview:img];
    [img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(44);
        make.right.offset(0);
        make.centerY.offset(0);
    }];
    
}

- (QMUILabel *)titleL {
    if (_titleL == nil) {
        
        _titleL = [BRToolsView br_label:@"--" textColor:kColorTitle font:[UIFont fontM:14]];
        _titleL.numberOfLines = 0;
    }
    return _titleL;
}

@end
